import Vue from 'vue';
import Router from 'vue-router';

Vue.use(Router);

export default new Router({
    routes: [
        {
            path: '/',
            redirect: '/login'
        },
        {
            path: '/payment',
            component: () => import(/* webpackChunkName: "home" */ '../components/Home.vue'),
            meta: { title: '付款申请' },
            children: [
				// {
				//     path: '/payment',
				//     component: () => import('../page/payment/index.vue'),
				//     meta: { title: '付款申请' }
				// },
				{
				    path: '/payment',
				    component: () => import('../page/payment/list.vue'),
				    meta: { title: '付款列表' }
				},
				{
				    path: '/user',
				    component: () => import(/* webpackChunkName: "dashboard" */ '../page/configure/user.vue'),
				    meta: { title: '用户管理' }
				},
				{
				    path: '/flow_user',
				    component: () => import(/* webpackChunkName: "dashboard" */ '../page/configure/flow.vue'),
				    meta: { title: '流程配置' }
				},
				{
				    path: '/configure_user',
				    component: () => import(/* webpackChunkName: "dashboard" */ '../page/configure/configure.vue'),
				    meta: { title: '权限管理' }
				}
            ]
        },
        {
            path: '/login',
            component: () => import(/* webpackChunkName: "login" */ '../page/login.vue'),
            meta: { title: '登录' }
        },
        {
            path: '*',
            redirect: '/404'
        }
    ]
});
